//
// Created by yukunlin on 2016/9/3.
//

#ifndef PDROBOT_LEAST_SQR_LINE_FIT_H
#define PDROBOT_LEAST_SQR_LINE_FIT_H

#include <vector>
#include <assert.h>

using namespace std;

class least_sqr_line_fit {
private:
    double k;
    double b;
public:
    least_sqr_line_fit ();
    double sum(vector<double> data);
    double dot(vector<double> x, vector<double> y);
    void fit (vector<double> y);
    void fit (vector<double> x, vector<double> y);
    double guess (double x);
};


#endif //PDROBOT_LEAST_SQR_LINE_FIT_H
